<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<?php foreach ($info_AR as $row)
{?>
<table width="538" border="0" align="right">
        <tr>
          <td width="602"><form id="form1" name="form1" method="post" action="<?php echo base_url();?>TravelAgencyController/updateInfoAgency/<?php echo $id_agency;?>/<?php echo $id_user;?>/<?php echo $username;?>/22">
            <table width="100%" border="0">
              <tr>
                <td><strong>Nombre Empresa</strong></td>
                <td><label>
                  <input name="company" type="text" id="company" value="<?php echo $row['nameCompany']; ?>" size="50" />
                  * </label></td>
              </tr>
              <tr>
                <td><strong>Nombre Agencia</strong></td>
                <td><label>
                  <input name="agency" type="text" id="agency"  value="<?php echo $row['nameTravelagency']; ?>" size="50" />
                  * </label></td>
              </tr>
              <tr>
                <td><strong>RIF</strong></td>
<td><label>
                  <input type="text" name="rif" id="rif" value="<?php if ($row['rif'] == NULL) { echo set_value('rif'); } else { echo $row['rif']; }?>" />
                </label></td>
              </tr>
              <tr>
                <td><strong>NIT</strong></td>
<td><label>
                  <input type="text" name="nit" id="nit" value="<?php if ($row['nit'] == NULL) { echo set_value('nit'); } else { echo $row['nit']; }?>" />
                </label></td>
              </tr>
              <tr>
                <td><strong>RTN</strong></td>
<td><label>
                  <input type="text" name="rtn" id="rtn" value="<?php if ($row['rtn'] == NULL) { echo set_value('rtn'); } else { echo $row['rtn']; }?>" />
                </label></td>
              </tr>
              <tr>
                <td><strong>VT</strong></td>
<td><label>
                  <input type="text" name="vt" id="vt" value="<?php if ($row['vt'] == NULL) { echo set_value('vt'); } else { echo $row['vt']; }?>" />
                </label></td>
              </tr>
              <tr>
                <td><strong>Se ubica en:</strong></td>
                <td><label>
                <select name="cities" id="cities">
                <option value=" "<?php echo set_select('cities',$row['fk_place'],TRUE); ?> ><?php echo $row['namePlace']?></option>
                <?php
					foreach($listCities as $aux)
					{
					?>
                <option value="<?php echo $aux['id']; ?>"<?php echo set_select('cities',$aux['id']); ?> > <?php echo $aux['name']; ?></option>
                <?php 
					}	 
					?>
          	    </select>
                  </label></td>
              </tr>
              <tr>
                <td><strong>Direccion Comercial</strong></td>
                <td><label>
                  <textarea name="addressC" cols="40" rows="4" id="addressC"><?php echo $row['comercialAddress']; ?></textarea>
                  * </label></td>
              </tr>
              <tr>
                <td><strong>Ubicacion Referencial</strong></td>
                <td><textarea name="addressR" cols="40" rows="4" id="addressR"><?php echo $row['referenceAddress']; ?></textarea>
                  *</td>
              </tr>
              <tr>
                <td><strong>Pagina WEB</strong></td>
<td><label>
                  <input name="pagweb" type="text" id="pagweb" size="50" value="<?php if ($row['pagWeb'] == NULL) { echo set_value('pagweb'); } else { echo $row['pagWeb']; } ?>" />
                </label></td>
              </tr>
              <tr>
                <td><strong>Email</strong></td>
                <td><label>
                  <input name="email" type="text" id="email" size="50" value="<?php echo $row['email']; ?>"/>
                  * </label></td>
              </tr>
              <tr>
                <td><strong>Teléfonos</strong></td>
                <td><table width="100%" border="0">
                <?php foreach ($tlf_agency as $tlf)
				{?>
                  <tr>
                    <td width="25%"><input name="<?php echo $tlf['type']; ?>A" type="text" id="<?php echo $tlf['type']; ?>A" size="15" value="<?php echo $tlf['number']; ?>"/></td>
                    <td width="75%">Tipo: <?php echo $tlf['type']; ?></td>
                  </tr>
                  <?php } //cierro el foreach ?>
                </table></td>
              </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#FF6600"><div align="center"><strong> Representante de Agencia de Viaje</strong></div></td>
              </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
              </tr>
              <tr>
                <td><strong>Primer Nombre</strong></td>
<td><label>
                  <input type="text" name="name" id="name" value="<?php echo $row['nameR']; ?>" />
 *               </label></td>
              </tr>
              <tr>
                <td><strong>Segundo Nombre</strong></td>
<td><label>
                  <input type="text" name="name2" id="name2" value="<?php echo $row['name2R']; ?>" />
                </label></td>
              </tr>
              <tr>
                <td><strong>Primer Apellido</strong></td>
<td><label>
                  <input type="text" name="lastname" id="lastname" value="<?php echo $row['lastnameR']; ?>" />
                  *
                </label></td>
              </tr>
              <tr>
                <td><strong>Segundo Apellido</strong></td>
<td><label>
                  <input type="text" name="lastname2" id="lastname2" value="<?php echo $row['lastname2R']; ?>" />
                </label></td>
              </tr>
              <tr>
                <td><strong>Email</strong></td>
<td><label>
                  <input name="emailR" type="emailR" id="emailR" size="50" value="<?php echo $row['emailR']; ?>"/>
                  * </label></td>
              </tr>
              <tr>
                <td height="24"><strong>Teléfono(s):</strong></td>
                <td><table width="100%" border="0">
                <?php foreach ($tlf_representative as $aux)
				{?>
                  <tr>
                    <td width="25%"><input name="<?php echo $aux['type']; ?>R" type="text" id="<?php echo $aux['type']; ?>R" value="<?php echo $aux['number']; ?>" size="15" /></td>
                    <td width="75%">Tipo: <?php echo $aux['type']; ?></td>
                  </tr>
                  <?php } ?>
                </table></td>
              </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
              </tr>
              <tr>
                <td colspan="2"><label>
                  <div align="center"><?php echo validation_errors(); ?></div>
                  <div align="center">
                    <input type="submit" name="button" id="button" value="Guardar Cambios" />
                  </div>
                </label></td>
              </tr>
            </table>
                    </form>          </td>
        </tr>
      </table>
<?php } //cierro el foreach?>
</body>
</html>
